Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature flag for create2 verification support #50

Merged
merged 6 commits into from
Oct 19, 2023

Conversation

svienot
Copy link
Contributor

@svienot svienot commented Oct 18, 2023

Description:

This brings changes in the ui and in the server:

  • In the UI, Create2 verification will only be available when the following is added to config.json:
    "CREATE2_VERIFICATION": true
    Note: When Create2 is activated, the TOKEN parameter will no longer be required in the UI since it does not seem to be needed and is quite confusing.

  • In the server, the API endpoints related to Create2 support will be exposed only if the following environment variable is defined:
    SERVER_CREATE2_VERIFICATION=true

@svienot svienot requested a review from Nana-EC October 18, 2023 18:38
@svienot svienot force-pushed the configurable-create2-support branch from 0d6621e to 3585c71 Compare October 18, 2023 18:44
@svienot svienot force-pushed the configurable-create2-support branch from 3585c71 to a5e95a9 Compare October 18, 2023 18:51
Copy link
Collaborator

@Nana-EC Nana-EC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feature flag is good, wondering about the server side exposure

…e flag for create2 endpoints.

Signed-off-by: Simon Viénot <[email protected]>
@svienot svienot requested a review from Nana-EC October 19, 2023 12:06
@svienot svienot force-pushed the configurable-create2-support branch 2 times, most recently from 5ef8def to f3c02a6 Compare October 19, 2023 14:19
@svienot svienot merged commit 99d7693 into main Oct 19, 2023
2 checks passed
@svienot svienot deleted the configurable-create2-support branch October 19, 2023 15:01
@acuarica
Copy link
Contributor

acuarica commented Dec 1, 2023

Is there a way to disable the related endpoints in the Swagger UI when SERVER_CREATE2_VERIFICATION if not enabled?

This is because otherwise these endpoints return 404 but with an HTML format instead of JSON. This in turn looks like a configuration error. For instance this is the response from the /verify/create2 endpoint

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>Cannot POST /verify/create2</pre>
</body>
</html>

This is how it's seen in the Swagger API

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants